<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新增科研成果</title>
    <style>
        /* 页面基本样式 */
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f7fc;
            margin: 0;
            padding: 0;
            color: #333;
        }

        h1 {
            text-align: center;
            font-size: 2rem;
            color: #4CAF50;
            margin-top: 20px;
        }

        .container {
            max-width: 800px;
            margin: 20px auto;
            padding: 20px;
            background-color: #ffffff;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .form-group {
            margin-bottom: 15px;
        }

        label {
            font-size: 1rem;
            font-weight: bold;
            color: #555;
            display: block;
            margin-bottom: 8px;
        }

        input, select, textarea {
            width: 100%;
            padding: 10px;
            margin: 5px 0 15px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 1rem;
            box-sizing: border-box;
        }

        input[type="date"] {
            padding: 8px;
        }

        textarea {
            resize: vertical;
            height: 120px;
        }

        button {
            background-color: #4CAF50;
            color: white;
            font-size: 1.1rem;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            width: 100%;
        }

        button:hover {
            background-color: #45a049;
        }

        .message {
            text-align: center;
            margin-top: 20px;
            font-size: 1.2rem;
            color: #ff5722;
        }

        .message.success {
            color: #4CAF50;
        }

        .message.error {
            color: #f44336;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .container {
                padding: 15px;
                margin: 10px;
            }

            h1 {
                font-size: 1.5rem;
            }

            button {
                font-size: 1rem;
            }
        }
    </style>
</head>
<body>

<h1>新增科研成果</h1>

<div class="container">
    <form method="POST" action="/admin/achievements" enctype="multipart/form-data">

        <!-- 成果标题 -->
        <div class="form-group">
            <label for="title">成果标题:</label>
            <input type="text" name="title" id="title" required="true"/>
        </div>

        <!-- 成果类别 -->
        <div class="form-group">
            <label for="category">成果类别:</label>
            <select name="category" id="category" required="true">
                <option value="0">专著</option>
                <option value="1">专利</option>
                <option value="2">软著</option>
                <option value="3">产品</option>
            </select>
        </div>

        <!-- 摘要 -->
        <div class="form-group">
            <label for="abstractText">摘要:</label>
            <textarea name="abstractText" id="abstractText" required="true"></textarea>
        </div>

        <!-- 详细描述 -->
        <div class="form-group">
            <label for="description">详细描述:</label>
            <textarea name="description" id="description" required="true"></textarea>
        </div>

        <!-- 附件 -->
        <div class="form-group">
            <label for="attachmentFile">附件上传 (支持 PDF):</label>
            <input type="file" name="attachmentFile" id="attachmentFile" accept=".pdf"/>
        </div>

        <!-- 展示图片 -->
        <div class="form-group">
            <label for="pictureFile">展示图片上传 (支持 JPG/PNG):</label>
            <input type="file" name="pictureFile" id="pictureFile" accept=".jpg,.jpeg,.png"/>
        </div>

        <!-- 发布日期 -->
        <div class="form-group">
            <label for="creationTime">发布日期:</label>
            <input type="date" name="creationTime" id="creationTime" required="true"/>
        </div>

<%--        <!-- 所属团队ID -->--%>
<%--        <div class="form-group">--%>
<%--            <label for="teamId">所属团队ID:</label>--%>
<%--            <input type="number" name="teamId" id="teamId" required="true"/>--%>
<%--        </div>--%>

<%--        <!-- 发布者用户ID -->--%>
<%--        <div class="form-group">--%>
<%--            <label for="userId">发布者用户ID:</label>--%>
<%--            <input type="number" name="userId" id="userId" required="true"/>--%>
<%--        </div>--%>

        <button type="submit">保存并发布</button>
    </form>

</div>

</body>
</html>
